<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<title>DWRService test</title>
<script type='text/javascript' src='/dwr/interface/DWRService.js'></script>
<script type='text/javascript' src='/dwr/engine.js'></script>
<script type='text/javascript' src='/dwr/util.js'></script>
<script>
function dwrTest() {
    a = document.getElementById("para").value;
    DWRService.getModuleList(a, onDataFound);
}
var onDataFound = function(data) {
    var msg = "<ol>";
    for(var i=0;i<data.length;i++) {  
        msg = msg + "<li>" + data[i]['moduleName'];
    }
    msg = msg + "</ol>";
    document.getElementById("resultDiv").innerHTML = "<span>" +
    "Result: " + msg + "</span>";
}
</script>
</head>
<body>
<h2>DWR Demo</h2>
<div style="background-color: #99CCFF;padding:1em;width:50%">
<strong>[DWR Test]</strong>
<p><a href="dwr/index.html" >DWR Debug Page</a></p>
<p>DWRService.getModuleList(<input type="text" name="para" id="para" size="5">)</p>
<p><input type="button" value="DWRService test" onClick="dwrTest();"></p>
<p><div id="resultDiv"  style="padding:1em;font-size:12px"></div></p>
</div>
</body>
</html>